package com.ziyia.tweened;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.TextView;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

//        ImageView view  = findViewById(R.id.wwl);

        TextView view = findViewById(R.id.nsyw);

        view.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // 透明
//                Animation animation = AnimationUtils.loadAnimation(MainActivity.this, R.anim.alpha);
                // 平衡
//                Animation animation = AnimationUtils.loadAnimation(MainActivity.this, R.anim.translate);
                // 旋转
                Animation animation = AnimationUtils.loadAnimation(MainActivity.this, R.anim.rotate);
                // 缩放
//                Animation animation = AnimationUtils.loadAnimation(MainActivity.this, R.anim.scale);
                view.startAnimation(animation);
            }
        });
    }
}